package com.yifang.yibingproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifang.yibingproject.entity.SysLogEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
@Mapper
public interface SysLogMapper extends BaseMapper<SysLogEntity> {

    List<String> selectTableNameList(@Param("tableName") String tableName);

    int createTable(@Param("tableName") String tableName);

    List<SysLogEntity> listByDate(@Param("tableName")String tableName, @Param("start")LocalDateTime start, @Param("end")LocalDateTime end);

    List<SysLogEntity> listByDateMember(@Param("shopId") String shopId, @Param("tableName")String tableName, @Param("start")LocalDateTime start, @Param("end")LocalDateTime end);
}
